<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<th:block th:include="common/head :: head('威胁预警')"/>
<body>
<th:block th:include="common/head :: header('/web/safety')"/>


<div class="page-main index-block3">
  <div class="index-safe">
    <div class="common-block">
      <div class="common-block-title">
        <img class="common-block-title__ico" src="/img/document.png" />
        <span class="common-block-title__txt">安全摘要</span>

        <div class="common-block-tool">
          <a href="/web/safetyAll">全部 <i class="fa fa-angle-right"></i></a>
        </div>
      </div>
      <div class="common-block-content" th:with="list=${@webInfo.getCmsContentByKind('SAFE', '', 6)}">
        <div class="safe-item" th:each="item : ${list}">
          <a class="safe-item-title" th:href="'/web/safety/view/' + ${item.uuid}" th:text="${item.title}"></a>
          <a class="safe-item-more" th:href="'/web/safety/view/' + ${item.uuid}">阅读详情</a>
        </div>
      </div>
    </div>
  </div>
  <div class="index-virus">
    <div class="common-block">
      <div class="common-block-title is-right">
        <span class="common-block-title__txt">病毒预报</span>
        <img class="common-block-title__ico" src="/img/warning.png" />

        <div class="common-block-tool">
          <a href="/web/virusAll"> <i class="fa fa-angle-left"></i> 全部</a>
        </div>
      </div>
      <div class="common-block-content" th:with="list=${@webInfo.getCmsContentByKind('VIRUS', '', 6)}">
        <div class="virus-item" th:each="item : ${list}">
          <span class="virus-item-more">病毒预报</span>
          <a class="virus-item-title" th:href="'/web/safety/view2/' + ${item.uuid}" th:text="${item.title}"></a>
        </div>
      </div>
    </div>
  </div>
</div>

<div class="page-main app-block">
  <div class="common-block">
    <div class="common-block-title">
      <img class="common-block-title__ico" src="/img/icon02.png" />
      <span class="common-block-title__txt">App检测合格通报</span>
    </div>
    <div class="common-block-content" id="apps">
      <div class="app-wrap">

      </div>
      <div class="page-wrap" id="pageEl" style="margin-top: 40px;"></div>
    </div>
  </div>
</div>

<th:block th:include="common/head :: link"/>
<th:block th:include="common/head :: footer"/>
<th:block th:include="common/head :: float" />
</body>
<th:block th:replace="common/head :: float-js" />
<th:block th:replace="include :: laypage-js" />

<script th:inline="javascript">

  loadApps();

  function loadApps() {
    const data = [
      {name: '百度网盘', img: '/img/app_bd.png', size: 39.1, version: '10.3.12', auths: 12},
      {name: '美团外卖', img: '/img/app_mt.png', size: 39.1, version: '10.3.12', auths: 12},
      {name: '饿了么', img: '/img/app_elm.png', size: 39.1, version: '10.3.12', auths: 12},
      {name: '微信', img: '/img/app_wx.png', size: 39.1, version: '10.3.12', auths: 12},
      {name: '微博', img: '/img/app_xl.png', size: 39.1, version: '10.3.12', auths: 12},
      {name: '网易云音乐', img: '/img/app_wyy.png', size: 39.1, version: '10.3.12', auths: 12},
      {name: '淘宝', img: '/img/app_tb.png', size: 39.1, version: '10.3.12', auths: 12},
      {name: '京东', img: '/img/app_jd.png', size: 39.1, version: '10.3.12', auths: 12},
      {name: '拼多多', img: '/img/app_pdd.png', size: 39.1, version: '10.3.12', auths: 12},
      {name: '抖音', img: '/img/app_dy.png', size: 39.1, version: '10.3.12', auths: 12},
      {name: '快手', img: '/img/app_ks.png', size: 39.1, version: '10.3.12', auths: 12},
      {name: '支付宝', img: '/img/app_zfb.png', size: 39.1, version: '10.3.12', auths: 12}
    ]


    buildApps(data)
  }

  function buildApps(data) {

    const appWrap = $('.app-wrap')


      const htmls = []

      for(let i = 0; i < data.length; i++) {
        const item = data[i]

        htmls.push('<div class="app-item">')
        htmls.push('  <img class="app-item-left" src="'+item.img+'" /> ')
        htmls.push('  <div class="app-item-mid">')
        htmls.push('    <div class="app-item-title">'+item.name+'</div>')
        htmls.push('    <div class="app-item-line">版本：'+ item.version +'</div>')
        htmls.push(' </div> ')
        htmls.push(' <div class="app-item-right">合格</div> ')
        htmls.push('</div> ')
      }

      appWrap.html(htmls.join(''))
  }

  laypage({
    cont: 'pageEl',
    curr: 1,
    pages: 10,
    jump: function(obj, first){

    }
  })
</script>
</html>

